package edu.ustb.efws.base.service.sms;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 短信发送结果
 *
 * @author TS Group
 */
public class SmsResult {
    private final String code;
    private final String errMsg;
    private final boolean success;

    /**
     * 短信发送结果
     *
     * @param code 返回编码
     * @param errMsg 错误信息
     * @param success 是否成功
     */
    public SmsResult(String code, String errMsg, boolean success) {
        this.code = code;
        this.errMsg = errMsg;
        this.success = success;
    }

    public String getCode() {
        return code;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public boolean isSuccess() {
        return success;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("code", code)
                .append("errMsg", errMsg)
                .append("success", success)
                .toString();
    }
}
